[INFO] cloning repository https://github.com/Drakulix/nvscreencopy
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Drakulix/nvscreencopy" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrakulix%2Fnvscreencopy", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrakulix%2Fnvscreencopy'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] a0c4ddbf2be38808f217623b2d496e156305858f
[INFO] fixing Drakulix/nvscreencopy against try#622891a4e29178280638a6b63a8908bde2c0c854+cargoflags=-Zfix-edition=end=2015,2024 for pr-157817-2
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrakulix%2Fnvscreencopy" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/Drakulix/nvscreencopy
[INFO] finished tweaking git repo https://github.com/Drakulix/nvscreencopy
[INFO] tweaked toml for git repo https://github.com/Drakulix/nvscreencopy written to /workspace/builds/worker-7-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/Drakulix/nvscreencopy on toolchain 622891a4e29178280638a6b63a8908bde2c0c854
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/Drakulix/nvscreencopy already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3a6becf2bc8dde7f3fa57ede90e4f284e72d296796fc446bbb1e2c7cc0530151" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] 4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114
[INFO] running `Command { std: "docker" "start" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114" "/opt/rustwide/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=" "-e" "RUSTDOCFLAGS=" "-w" "/opt/rustwide/workdir" "--user" "0:0" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114" "/opt/rustwide/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "fix" "--allow-no-vcs" "--allow-dirty" "--frozen" "--all" "--all-targets" "--message-format=json" "-Zfix-edition=end=2015,2024", kill_on_drop: false }`
[INFO] [stderr] crater-edition-check: migrating to next edition
[INFO] [stderr]    Migrating Cargo.toml from 2018 edition to 2021
[INFO] [stderr] note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
[INFO] [stderr] This may cause some dependencies to be built with fewer features enabled than previously.
[INFO] [stderr] More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
[INFO] [stderr] When building the following dependencies, the given features will no longer be used:
[INFO] [stderr] 
[INFO] [stderr]   log v0.4.14 (as host dependency) removed features: std
[INFO] [stderr] 
[INFO] [stderr]    Compiling libc v0.2.98
[INFO] [stderr]    Compiling proc-macro2 v1.0.28
[INFO] [stderr]    Compiling log v0.4.14
[INFO] [stderr]     Checking once_cell v1.8.0
[INFO] [stderr]    Compiling memoffset v0.6.4
[INFO] [stderr]     Checking libloading v0.7.0
[INFO] [stderr]    Compiling num-traits v0.2.14
[INFO] [stderr]    Compiling wayland-sys v0.28.6
[INFO] [stderr]    Compiling slog v2.7.0
[INFO] [stderr]     Checking dlib v0.5.0
[INFO] [stderr]    Compiling wayland-sys v0.29.0
[INFO] [stderr]    Compiling version_check v0.9.3
[INFO] [stderr]    Compiling gl_generator v0.14.0
[INFO] [stderr]    Compiling syn v1.0.74
[INFO] [stderr]    Compiling drm-sys v0.1.1
[INFO] [stderr]    Compiling nom v6.2.1
[INFO] [stderr]    Compiling num-integer v0.1.44
[INFO] [stderr]    Compiling crossbeam-utils v0.8.5
[INFO] [stderr]    Compiling drm-fourcc v2.1.1
[INFO] [stderr]    Compiling input-sys v1.15.1
[INFO] [stderr]    Compiling cgmath v0.18.0
[INFO] [stderr]    Compiling quote v1.0.9
[INFO] [stderr]     Checking arc-swap v1.3.0
[INFO] [stderr]    Compiling wayland-scanner v0.28.6
[INFO] [stderr]    Compiling wayland-scanner v0.29.0
[INFO] [stderr]     Checking slog-scope v4.4.0
[INFO] [stderr]     Checking approx v0.4.0
[INFO] [stderr]    Compiling smithay v0.3.0
[INFO] [stderr]     Checking thread_local v1.1.3
[INFO] [stderr]    Compiling anyhow v1.0.42
[INFO] [stderr]     Checking unicode-width v0.1.8
[INFO] [stderr]     Checking remove_dir_all v0.5.3
[INFO] [stderr]     Checking textwrap v0.11.0
[INFO] [stderr]     Checking crossbeam-channel v0.5.1
[INFO] [stderr]     Checking nix v0.22.0
[INFO] [stderr]     Checking getrandom v0.2.3
[INFO] [stderr]     Checking nix v0.20.0
[INFO] [stderr]     Checking rand_core v0.6.3
[INFO] [stderr]     Checking rand_chacha v0.3.1
[INFO] [stderr]     Checking libudev-sys v0.1.4
[INFO] [stderr]     Checking dirs-sys-next v0.1.2
[INFO] [stderr]     Checking rand v0.8.4
[INFO] [stderr]    Compiling wayland-server v0.29.0
[INFO] [stderr]    Compiling wayland-client v0.28.6
[INFO] [stderr]    Compiling wayland-protocols v0.28.6
[INFO] [stderr]    Compiling wayland-protocols v0.29.0
[INFO] [stderr]     Checking dirs-next v2.0.0
[INFO] [stderr]     Checking udev v0.6.2
[INFO] [stderr]     Checking xcursor v0.3.3
[INFO] [stderr]     Checking nix v0.19.1
[INFO] [stderr]     Checking nix v0.21.0
[INFO] [stderr]     Checking time v0.1.43
[INFO] [stderr]     Checking atty v0.2.14
[INFO] [stderr]    Compiling thiserror-impl v1.0.26
[INFO] [stderr]     Checking input v0.6.0
[INFO] [stderr]     Checking chrono v0.4.19
[INFO] [stderr]     Checking wayland-commons v0.29.0
[INFO] [stderr]     Checking drm-ffi v0.2.0
[INFO] [stderr]     Checking thiserror v1.0.26
[INFO] [stderr]     Checking term v0.7.0
[INFO] [stderr]     Checking wayland-commons v0.28.6
[INFO] [stderr]     Checking drm v0.5.0
[INFO] [stderr]     Checking tempfile v3.2.0
[INFO] [stderr]    Compiling nvscreencopy v0.1.0 (/opt/rustwide/workdir)
[INFO] [stderr]    Migrating build.rs from 2018 edition to 2021
[INFO] [stderr]     Checking xkbcommon v0.4.0
[INFO] [stderr]     Checking calloop v0.9.0
[INFO] [stderr]     Checking memmap2 v0.2.3
[INFO] [stderr]     Checking slog-stdlog v4.1.0
[INFO] [stderr]     Checking appendlist v1.4.0
[INFO] [stderr]     Checking scan_fmt v0.2.6
[INFO] [stderr]     Checking take_mut v0.2.2
[INFO] [stderr]     Checking clap v2.33.3
[INFO] [stderr]     Checking calloop v0.7.2
[INFO] [stderr]     Checking wayland-cursor v0.28.6
[INFO] [stderr]     Checking slog-async v2.6.0
[INFO] [stderr]     Checking slog-term v2.8.0
[INFO] [stderr]     Checking smithay-client-toolkit v0.14.0
[INFO] [stderr]    Migrating src/main.rs from 2018 edition to 2021
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 07s
[INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: nom v6.2.1
[INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4`
[INFO] [stderr] crater-edition-check: nvscreencopy v0.1.0 (/opt/rustwide/workdir) updating edition from 2018 to 2021
[INFO] [stderr]    Compiling log v0.4.14
[INFO] [stderr]    Compiling gl_generator v0.14.0
[INFO] [stderr]    Compiling smithay v0.3.0
[INFO] [stderr]    Compiling nvscreencopy v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: variable does not need to be mutable
[INFO] [stdout]   --> src/main.rs:89:9
[INFO] [stdout]    |
[INFO] [stdout] 89 |     let mut state: &mut WaylandState = data.get().unwrap();
[INFO] [stdout]    |         ----^^^^^
[INFO] [stdout]    |         |
[INFO] [stdout]    |         help: remove this `mut`
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16253
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18892
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19233
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19743
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20431
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20613
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20832
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21058
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21391
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21561
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21737
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21913
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22183
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22254
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: variable does not need to be mutable
[INFO] [stdout]   --> src/main.rs:89:9
[INFO] [stdout]    |
[INFO] [stdout] 89 |     let mut state: &mut WaylandState = data.get().unwrap();
[INFO] [stdout]    |         ----^^^^^
[INFO] [stdout]    |         |
[INFO] [stdout]    |         help: remove this `mut`
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16253
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18892
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19233
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19743
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20431
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20613
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20832
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21058
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21391
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21561
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21737
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21913
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22183
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22254
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 16s
[INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: nom v6.2.1
[INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4`
[INFO] [stderr] crater-edition-check: migrating to next edition
[INFO] [stderr]    Migrating Cargo.toml from 2018 edition to 2021
[INFO] [stderr] note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
[INFO] [stderr] This may cause some dependencies to be built with fewer features enabled than previously.
[INFO] [stderr] More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
[INFO] [stderr] When building the following dependencies, the given features will no longer be used:
[INFO] [stderr] 
[INFO] [stderr]   log v0.4.14 (as host dependency) removed features: std
[INFO] [stderr] 
[INFO] [stderr]     Checking nvscreencopy v0.1.0 (/opt/rustwide/workdir)
[INFO] [stderr]    Migrating src/main.rs from 2021 edition to 2024
[INFO] [stderr]        Fixed /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs (71 fixes)
[INFO] [stderr]        Fixed /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs (1 fix)
[INFO] [stderr]        Fixed src/egl.rs (2 fixes)
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16263
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `--force-warn static-mut-refs` implied by `--force-warn rust-2024-compatibility`
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18902
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19243
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19753
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20441
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20623
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20842
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21068
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21401
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21571
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21747
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21923
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22193
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22264
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16263
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `--force-warn static-mut-refs` implied by `--force-warn rust-2024-compatibility`
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18902
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19243
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19753
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20441
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20623
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20842
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21068
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21401
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21571
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21747
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21923
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22193
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22264
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { unsafe { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } }} fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 18s
[INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: nom v6.2.1
[INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4`
[INFO] [stderr] crater-edition-check: nvscreencopy v0.1.0 (/opt/rustwide/workdir) updating edition from 2021 to 2024
[INFO] [stderr]    Compiling nvscreencopy v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14845
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ch opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14673
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { ...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout]   = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14921
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...k (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => {...
[INFO] [stdout]   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14956
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ce { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: ...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15036
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15114
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = ::...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15195
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...icated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15278
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...rgs , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , ...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:79
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...lean { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum) -> types::EGLBoolean>(storage::BindAPI.f)(api) }
[INFO] [stdout]     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:13
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...   pub unsafe fn BindAPI(api: types::EGLenum) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(types:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:170
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...em" fn(types::EGLenum) -> types::EGLBoolean>(storage::BindAPI.f)(api) }
[INFO] [stdout]     |                                                 ^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:138
[INFO] [stdout]     |
[INFO] [stdout] 354 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint) -> types::EGLBoolean>(storage::BindTexImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:13
[INFO] [stdout]     |
[INFO] [stdout] 354 | ...   pub unsafe fn BindTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:266
[INFO] [stdout]     |
[INFO] [stdout] 354 | ...ace, types::EGLint) -> types::EGLBoolean>(storage::BindTexImage.f)(dpy, surface, buffer) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:214
[INFO] [stdout]     |
[INFO] [stdout] 356 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLint, *mut types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::ChooseConfig.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:13
[INFO] [stdout]     |
[INFO] [stdout] 356 | ...   pub unsafe fn ChooseConfig(dpy: types::EGLDisplay, attrib_list: *const types::EGLint, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:388
[INFO] [stdout]     |
[INFO] [stdout] 356 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::ChooseConfig.f)(dpy, attrib_list, configs, config_size, num_config) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:154
[INFO] [stdout]     |
[INFO] [stdout] 359 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint, types::EGLTime) -> types::EGLint>(storage::ClientWaitSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:13
[INFO] [stdout]     |
[INFO] [stdout] 359 | ...   pub unsafe fn ClientWaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint, timeout: types::EGLTime) -> types::EGLint { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:291
[INFO] [stdout]     |
[INFO] [stdout] 359 | ...GLint, types::EGLTime) -> types::EGLint>(storage::ClientWaitSync.f)(dpy, sync, flags, timeout) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:150
[INFO] [stdout]     |
[INFO] [stdout] 361 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLNativePixmapType) -> types::EGLBoolean>(storage::CopyBuffers.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:13
[INFO] [stdout]     |
[INFO] [stdout] 361 | ...   pub unsafe fn CopyBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface, target: types::EGLNativePixmapType) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:291
[INFO] [stdout]     |
[INFO] [stdout] 361 | ...EGLNativePixmapType) -> types::EGLBoolean>(storage::CopyBuffers.f)(dpy, surface, target) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:183
[INFO] [stdout]     |
[INFO] [stdout] 363 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLContext, *const types::EGLint) -> types::EGLContext>(storage::CreateContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:13
[INFO] [stdout]     |
[INFO] [stdout] 363 | ...   pub unsafe fn CreateContext(dpy: types::EGLDisplay, config: types::EGLConfig, share_context: types::EGLContext, attrib_list: *const types::EGLint) -> types::EGLContext { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:336
[INFO] [stdout]     |
[INFO] [stdout] 363 | ...onst types::EGLint) -> types::EGLContext>(storage::CreateContext.f)(dpy, config, share_context, attrib_list) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:202
[INFO] [stdout]     |
[INFO] [stdout] 365 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLenum, types::EGLClientBuffer, *const types::EGLAttrib) -> types::EGLImage>(storage::CreateImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:13
[INFO] [stdout]     |
[INFO] [stdout] 365 | ...   pub unsafe fn CreateImage(dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLAttrib) -> types::EGLImage { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:378
[INFO] [stdout]     |
[INFO] [stdout] 365 | ...onst types::EGLAttrib) -> types::EGLImage>(storage::CreateImage.f)(dpy, ctx, target, buffer, attrib_list) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:205
[INFO] [stdout]     |
[INFO] [stdout] 367 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLenum, types::EGLClientBuffer, *const types::EGLint) -> types::EGLImageKHR>(storage::CreateImageKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:13
[INFO] [stdout]     |
[INFO] [stdout] 367 | ...   pub unsafe fn CreateImageKHR(dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLint) -> types::EGLImageKHR { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:381
[INFO] [stdout]     |
[INFO] [stdout] 367 | ...st types::EGLint) -> types::EGLImageKHR>(storage::CreateImageKHR.f)(dpy, ctx, target, buffer, attrib_list) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:222
[INFO] [stdout]     |
[INFO] [stdout] 369 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLenum, types::EGLClientBuffer, types::EGLConfig, *const types::EGLint) -> types::EGLSurface>(storage::CreatePbufferFromClientBuffer.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:13
[INFO] [stdout]     |
[INFO] [stdout] 369 | ...   pub unsafe fn CreatePbufferFromClientBuffer(dpy: types::EGLDisplay, buftype: types::EGLenum, buffer: types::EGLClientBuffer, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:396
[INFO] [stdout]     |
[INFO] [stdout] 369 | ...es::EGLint) -> types::EGLSurface>(storage::CreatePbufferFromClientBuffer.f)(dpy, buftype, buffer, config, attrib_list) }
[INFO] [stdout]     |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:156
[INFO] [stdout]     |
[INFO] [stdout] 371 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *const types::EGLint) -> types::EGLSurface>(storage::CreatePbufferSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:13
[INFO] [stdout]     |
[INFO] [stdout] 371 | ...   pub unsafe fn CreatePbufferSurface(dpy: types::EGLDisplay, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:290
[INFO] [stdout]     |
[INFO] [stdout] 371 | ... types::EGLint) -> types::EGLSurface>(storage::CreatePbufferSurface.f)(dpy, config, attrib_list) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:191
[INFO] [stdout]     |
[INFO] [stdout] 373 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLNativePixmapType, *const types::EGLint) -> types::EGLSurface>(storage::CreatePixmapSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:13
[INFO] [stdout]     |
[INFO] [stdout] 373 | ...   pub unsafe fn CreatePixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, pixmap: types::EGLNativePixmapType, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:353
[INFO] [stdout]     |
[INFO] [stdout] 373 | ...t types::EGLint) -> types::EGLSurface>(storage::CreatePixmapSurface.f)(dpy, config, pixmap, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:213
[INFO] [stdout]     |
[INFO] [stdout] 375 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformPixmapSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:13
[INFO] [stdout]     |
[INFO] [stdout] 375 | ...   pub unsafe fn CreatePlatformPixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:382
[INFO] [stdout]     |
[INFO] [stdout] 375 | ...::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformPixmapSurface.f)(dpy, config, native_pixmap, attrib_list) }
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:213
[INFO] [stdout]     |
[INFO] [stdout] 377 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLSurface>(storage::CreatePlatformPixmapSurfaceEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:13
[INFO] [stdout]     |
[INFO] [stdout] 377 | ...   pub unsafe fn CreatePlatformPixmapSurfaceEXT(dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:379
[INFO] [stdout]     |
[INFO] [stdout] 377 | ...s::EGLint) -> types::EGLSurface>(storage::CreatePlatformPixmapSurfaceEXT.f)(dpy, config, native_pixmap, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:213
[INFO] [stdout]     |
[INFO] [stdout] 379 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformWindowSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:13
[INFO] [stdout]     |
[INFO] [stdout] 379 | ...   pub unsafe fn CreatePlatformWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:382
[INFO] [stdout]     |
[INFO] [stdout] 379 | ...::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformWindowSurface.f)(dpy, config, native_window, attrib_list) }
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:213
[INFO] [stdout]     |
[INFO] [stdout] 381 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLSurface>(storage::CreatePlatformWindowSurfaceEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:13
[INFO] [stdout]     |
[INFO] [stdout] 381 | ...   pub unsafe fn CreatePlatformWindowSurfaceEXT(dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:379
[INFO] [stdout]     |
[INFO] [stdout] 381 | ...s::EGLint) -> types::EGLSurface>(storage::CreatePlatformWindowSurfaceEXT.f)(dpy, config, native_window, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:127
[INFO] [stdout]     |
[INFO] [stdout] 383 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLint) -> types::EGLStreamKHR>(storage::CreateStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:13
[INFO] [stdout]     |
[INFO] [stdout] 383 | ...   pub unsafe fn CreateStreamKHR(dpy: types::EGLDisplay, attrib_list: *const types::EGLint) -> types::EGLStreamKHR { __gl_import...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:245
[INFO] [stdout]     |
[INFO] [stdout] 383 | ...t types::EGLint) -> types::EGLStreamKHR>(storage::CreateStreamKHR.f)(dpy, attrib_list) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:195
[INFO] [stdout]     |
[INFO] [stdout] 385 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLStreamKHR, *const types::EGLint) -> types::EGLSurface>(storage::CreateStreamProducerSurfaceKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:13
[INFO] [stdout]     |
[INFO] [stdout] 385 | ...   pub unsafe fn CreateStreamProducerSurfaceKHR(dpy: types::EGLDisplay, config: types::EGLConfig, stream: types::EGLStreamKHR, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:350
[INFO] [stdout]     |
[INFO] [stdout] 385 | ...s::EGLint) -> types::EGLSurface>(storage::CreateStreamProducerSurfaceKHR.f)(dpy, config, stream, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:143
[INFO] [stdout]     |
[INFO] [stdout] 388 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLenum, *const types::EGLAttrib) -> types::EGLSync>(storage::CreateSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:13
[INFO] [stdout]     |
[INFO] [stdout] 388 | ...   pub unsafe fn CreateSync(dpy: types::EGLDisplay, type_: types::EGLenum, attrib_list: *const types::EGLAttrib) -> types::EGLSync { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:275
[INFO] [stdout]     |
[INFO] [stdout] 388 | ...const types::EGLAttrib) -> types::EGLSync>(storage::CreateSync.f)(dpy, type_, attrib_list) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:188
[INFO] [stdout]     |
[INFO] [stdout] 390 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLNativeWindowType, *const types::EGLint) -> types::EGLSurface>(storage::CreateWindowSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:13
[INFO] [stdout]     |
[INFO] [stdout] 390 | ...   pub unsafe fn CreateWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, win: types::EGLNativeWindowType, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:350
[INFO] [stdout]     |
[INFO] [stdout] 390 | ...t types::EGLint) -> types::EGLSurface>(storage::CreateWindowSurface.f)(dpy, config, win, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:113
[INFO] [stdout]     |
[INFO] [stdout] 392 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext) -> types::EGLBoolean>(storage::DestroyContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:13
[INFO] [stdout]     |
[INFO] [stdout] 392 | ...   pub unsafe fn DestroyContext(dpy: types::EGLDisplay, ctx: types::EGLContext) -> types::EGLBoolean { __gl_imports::mem::transm...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:226
[INFO] [stdout]     |
[INFO] [stdout] 392 | ...types::EGLContext) -> types::EGLBoolean>(storage::DestroyContext.f)(dpy, ctx) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:111
[INFO] [stdout]     |
[INFO] [stdout] 395 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLImage) -> types::EGLBoolean>(storage::DestroyImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:13
[INFO] [stdout]     |
[INFO] [stdout] 395 | ...   pub unsafe fn DestroyImage(dpy: types::EGLDisplay, image: types::EGLImage) -> types::EGLBoolean { __gl_imports::mem::transmut...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:222
[INFO] [stdout]     |
[INFO] [stdout] 395 | ...y, types::EGLImage) -> types::EGLBoolean>(storage::DestroyImage.f)(dpy, image) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:117
[INFO] [stdout]     |
[INFO] [stdout] 397 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLImageKHR) -> types::EGLBoolean>(storage::DestroyImageKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:13
[INFO] [stdout]     |
[INFO] [stdout] 397 | ...   pub unsafe fn DestroyImageKHR(dpy: types::EGLDisplay, image: types::EGLImageKHR) -> types::EGLBoolean { __gl_imports::mem::tr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:231
[INFO] [stdout]     |
[INFO] [stdout] 397 | ...ypes::EGLImageKHR) -> types::EGLBoolean>(storage::DestroyImageKHR.f)(dpy, image) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:120
[INFO] [stdout]     |
[INFO] [stdout] 399 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR) -> types::EGLBoolean>(storage::DestroyStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:13
[INFO] [stdout]     |
[INFO] [stdout] 399 | ...   pub unsafe fn DestroyStreamKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR) -> types::EGLBoolean { __gl_imports::mem:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:235
[INFO] [stdout]     |
[INFO] [stdout] 399 | ...es::EGLStreamKHR) -> types::EGLBoolean>(storage::DestroyStreamKHR.f)(dpy, stream) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:117
[INFO] [stdout]     |
[INFO] [stdout] 401 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface) -> types::EGLBoolean>(storage::DestroySurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:13
[INFO] [stdout]     |
[INFO] [stdout] 401 | ...   pub unsafe fn DestroySurface(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean { __gl_imports::mem::tr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:230
[INFO] [stdout]     |
[INFO] [stdout] 401 | ...types::EGLSurface) -> types::EGLBoolean>(storage::DestroySurface.f)(dpy, surface) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:108
[INFO] [stdout]     |
[INFO] [stdout] 404 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync) -> types::EGLBoolean>(storage::DestroySync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:13
[INFO] [stdout]     |
[INFO] [stdout] 404 | ...   pub unsafe fn DestroySync(dpy: types::EGLDisplay, sync: types::EGLSync) -> types::EGLBoolean { __gl_imports::mem::transmute::...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:218
[INFO] [stdout]     |
[INFO] [stdout] 404 | ...lay, types::EGLSync) -> types::EGLBoolean>(storage::DestroySync.f)(dpy, sync) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:169
[INFO] [stdout]     |
[INFO] [stdout] 406 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:13
[INFO] [stdout]     |
[INFO] [stdout] 406 | ...   pub unsafe fn GetConfigAttrib(dpy: types::EGLDisplay, config: types::EGLConfig, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:316
[INFO] [stdout]     |
[INFO] [stdout] 406 | ...mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigAttrib.f)(dpy, config, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:177
[INFO] [stdout]     |
[INFO] [stdout] 408 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *mut types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigs.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:13
[INFO] [stdout]     |
[INFO] [stdout] 408 | ...   pub unsafe fn GetConfigs(dpy: types::EGLDisplay, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:329
[INFO] [stdout]     |
[INFO] [stdout] 408 | ... *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigs.f)(dpy, configs, config_size, num_config) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:70
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...ontext { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLContext>(storage::GetCurrentContext.f)() }
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:13
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...   pub unsafe fn GetCurrentContext() -> types::EGLContext { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGL...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:147
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...ern "system" fn() -> types::EGLContext>(storage::GetCurrentContext.f)() }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:70
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...isplay { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLDisplay>(storage::GetCurrentDisplay.f)() }
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:13
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...   pub unsafe fn GetCurrentDisplay() -> types::EGLDisplay { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGL...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:147
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...ern "system" fn() -> types::EGLDisplay>(storage::GetCurrentDisplay.f)() }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:93
[INFO] [stdout]     |
[INFO] [stdout] 414 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint) -> types::EGLSurface>(storage::GetCurrentSurface.f)(readd...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:13
[INFO] [stdout]     |
[INFO] [stdout] 414 | ...   pub unsafe fn GetCurrentSurface(readdraw: types::EGLint) -> types::EGLSurface { __gl_imports::mem::transmute::<_, extern "sys...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:183
[INFO] [stdout]     |
[INFO] [stdout] 414 | ...fn(types::EGLint) -> types::EGLSurface>(storage::GetCurrentSurface.f)(readdraw) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:102
[INFO] [stdout]     |
[INFO] [stdout] 416 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLNativeDisplayType) -> types::EGLDisplay>(storage::GetDisplay.f)(di...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:13
[INFO] [stdout]     |
[INFO] [stdout] 416 | ...   pub unsafe fn GetDisplay(display_id: types::EGLNativeDisplayType) -> types::EGLDisplay { __gl_imports::mem::transmute::<_, ex...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:206
[INFO] [stdout]     |
[INFO] [stdout] 416 | ...GLNativeDisplayType) -> types::EGLDisplay>(storage::GetDisplay.f)(display_id) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:57
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...nt { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLint>(storage::GetError.f)() }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:13
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...   pub unsafe fn GetError() -> types::EGLint { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLint>(storage:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:130
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...:<_, extern "system" fn() -> types::EGLint>(storage::GetError.f)() }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:229
[INFO] [stdout]     |
[INFO] [stdout] 420 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLAttrib, *mut types::EGLOutputLayerEXT, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetOutputLayersEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:13
[INFO] [stdout]     |
[INFO] [stdout] 420 | ...   pub unsafe fn GetOutputLayersEXT(dpy: types::EGLDisplay, attrib_list: *const types::EGLAttrib, layers: *mut types::EGLOutputLayerEXT, max_layers: types::EGLint, num_layers: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:414
[INFO] [stdout]     |
[INFO] [stdout] 420 | ...t types::EGLint) -> types::EGLBoolean>(storage::GetOutputLayersEXT.f)(dpy, attrib_list, layers, max_layers, num_layers) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:224
[INFO] [stdout]     |
[INFO] [stdout] 422 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLAttrib, *mut types::EGLOutputPortEXT, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetOutputPortsEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:13
[INFO] [stdout]     |
[INFO] [stdout] 422 | ...   pub unsafe fn GetOutputPortsEXT(dpy: types::EGLDisplay, attrib_list: *const types::EGLAttrib, ports: *mut types::EGLOutputPortEXT, max_ports: types::EGLint, num_ports: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:408
[INFO] [stdout]     |
[INFO] [stdout] 422 | ...ut types::EGLint) -> types::EGLBoolean>(storage::GetOutputPortsEXT.f)(dpy, attrib_list, ports, max_ports, num_ports) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:181
[INFO] [stdout]     |
[INFO] [stdout] 424 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLDisplay>(storage::GetPlatformDisplay.f)(pl...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:13
[INFO] [stdout]     |
[INFO] [stdout] 424 | ...   pub unsafe fn GetPlatformDisplay(platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLDisplay { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:329
[INFO] [stdout]     |
[INFO] [stdout] 424 | ...ypes::EGLAttrib) -> types::EGLDisplay>(storage::GetPlatformDisplay.f)(platform, native_display, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:181
[INFO] [stdout]     |
[INFO] [stdout] 426 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLDisplay>(storage::GetPlatformDisplayEXT.f)(pl...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:13
[INFO] [stdout]     |
[INFO] [stdout] 426 | ...   pub unsafe fn GetPlatformDisplayEXT(platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLDisplay { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:326
[INFO] [stdout]     |
[INFO] [stdout] 426 | ... types::EGLint) -> types::EGLDisplay>(storage::GetPlatformDisplayEXT.f)(platform, native_display, attrib_list) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:139
[INFO] [stdout]     |
[INFO] [stdout] 428 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(*const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType>(storage::GetProcAddress.f)(pr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:13
[INFO] [stdout]     |
[INFO] [stdout] 428 | ...   pub unsafe fn GetProcAddress(procname: *const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:278
[INFO] [stdout]     |
[INFO] [stdout] 428 | ..._eglMustCastToProperFunctionPointerType>(storage::GetProcAddress.f)(procname) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:166
[INFO] [stdout]     |
[INFO] [stdout] 430 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::GetSyncAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:13
[INFO] [stdout]     |
[INFO] [stdout] 430 | ...   pub unsafe fn GetSyncAttrib(dpy: types::EGLDisplay, sync: types::EGLSync, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:314
[INFO] [stdout]     |
[INFO] [stdout] 430 | ...t types::EGLAttrib) -> types::EGLBoolean>(storage::GetSyncAttrib.f)(dpy, sync, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:139
[INFO] [stdout]     |
[INFO] [stdout] 432 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *mut types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::Initialize.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:13
[INFO] [stdout]     |
[INFO] [stdout] 432 | ...   pub unsafe fn Initialize(dpy: types::EGLDisplay, major: *mut types::EGLint, minor: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:273
[INFO] [stdout]     |
[INFO] [stdout] 432 | ... *mut types::EGLint) -> types::EGLBoolean>(storage::Initialize.f)(dpy, major, minor) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:160
[INFO] [stdout]     |
[INFO] [stdout] 434 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLSurface, types::EGLContext) -> types::EGLBoolean>(storage::MakeCurrent.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:13
[INFO] [stdout]     |
[INFO] [stdout] 434 | ...   pub unsafe fn MakeCurrent(dpy: types::EGLDisplay, draw: types::EGLSurface, read: types::EGLSurface, ctx: types::EGLContext) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:311
[INFO] [stdout]     |
[INFO] [stdout] 434 | ..., types::EGLContext) -> types::EGLBoolean>(storage::MakeCurrent.f)(dpy, draw, read, ctx) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:179
[INFO] [stdout]     |
[INFO] [stdout] 436 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint, types::EGLAttrib) -> types::EGLBoolean>(storage::OutputLayerAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:13
[INFO] [stdout]     |
[INFO] [stdout] 436 | ...   pub unsafe fn OutputLayerAttribEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, attribute: types::EGLint, value: types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:332
[INFO] [stdout]     |
[INFO] [stdout] 436 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::OutputLayerAttribEXT.f)(dpy, layer, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:176
[INFO] [stdout]     |
[INFO] [stdout] 438 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint, types::EGLAttrib) -> types::EGLBoolean>(storage::OutputPortAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:13
[INFO] [stdout]     |
[INFO] [stdout] 438 | ...   pub unsafe fn OutputPortAttribEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, attribute: types::EGLint, value: types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:328
[INFO] [stdout]     |
[INFO] [stdout] 438 | ...ypes::EGLAttrib) -> types::EGLBoolean>(storage::OutputPortAttribEXT.f)(dpy, port, attribute, value) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:58
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...um { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLenum>(storage::QueryAPI.f)() }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:13
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...   pub unsafe fn QueryAPI() -> types::EGLenum { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLenum>(storag...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:132
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...<_, extern "system" fn() -> types::EGLenum>(storage::QueryAPI.f)() }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:164
[INFO] [stdout]     |
[INFO] [stdout] 442 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:13
[INFO] [stdout]     |
[INFO] [stdout] 442 | ...   pub unsafe fn QueryContext(dpy: types::EGLDisplay, ctx: types::EGLContext, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:312
[INFO] [stdout]     |
[INFO] [stdout] 442 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::QueryContext.f)(dpy, ctx, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:156
[INFO] [stdout]     |
[INFO] [stdout] 444 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDeviceEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryDeviceAttribEXT.f)(de...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:13
[INFO] [stdout]     |
[INFO] [stdout] 444 | ...   pub unsafe fn QueryDeviceAttribEXT(device: types::EGLDeviceEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:290
[INFO] [stdout]     |
[INFO] [stdout] 444 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::QueryDeviceAttribEXT.f)(device, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:136
[INFO] [stdout]     |
[INFO] [stdout] 446 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDeviceEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryDeviceStringEXT.f)(de...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:13
[INFO] [stdout]     |
[INFO] [stdout] 446 | ...   pub unsafe fn QueryDeviceStringEXT(device: types::EGLDeviceEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { __...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:262
[INFO] [stdout]     |
[INFO] [stdout] 446 | ... -> *const __gl_imports::raw::c_char>(storage::QueryDeviceStringEXT.f)(device, name) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:162
[INFO] [stdout]     |
[INFO] [stdout] 448 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint, *mut types::EGLDeviceEXT, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDevicesEXT.f)(ma...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:13
[INFO] [stdout]     |
[INFO] [stdout] 448 | ...   pub unsafe fn QueryDevicesEXT(max_devices: types::EGLint, devices: *mut types::EGLDeviceEXT, num_devices: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:298
[INFO] [stdout]     |
[INFO] [stdout] 448 | ...mut types::EGLint) -> types::EGLBoolean>(storage::QueryDevicesEXT.f)(max_devices, devices, num_devices) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:152
[INFO] [stdout]     |
[INFO] [stdout] 450 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryDisplayAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:13
[INFO] [stdout]     |
[INFO] [stdout] 450 | ...   pub unsafe fn QueryDisplayAttribEXT(dpy: types::EGLDisplay, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:284
[INFO] [stdout]     |
[INFO] [stdout] 450 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::QueryDisplayAttribEXT.f)(dpy, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:186
[INFO] [stdout]     |
[INFO] [stdout] 452 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, *mut types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufFormatsEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:13
[INFO] [stdout]     |
[INFO] [stdout] 452 | ...   pub unsafe fn QueryDmaBufFormatsEXT(dpy: types::EGLDisplay, max_formats: types::EGLint, formats: *mut types::EGLint, num_formats: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:335
[INFO] [stdout]     |
[INFO] [stdout] 452 | ... types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufFormatsEXT.f)(dpy, max_formats, formats, num_formats) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:262
[INFO] [stdout]     |
[INFO] [stdout] 454 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, types::EGLint, *mut types::EGLuint64KHR, *mut types::EGLBoolean, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufModifiersEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:13
[INFO] [stdout]     |
[INFO] [stdout] 454 | ...   pub unsafe fn QueryDmaBufModifiersEXT(dpy: types::EGLDisplay, format: types::EGLint, max_modifiers: types::EGLint, modifiers: *mut types::EGLuint64KHR, external_only: *mut types::EGLBoolean, num_modifiers: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:456
[INFO] [stdout]     |
[INFO] [stdout] 454 | ...types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufModifiersEXT.f)(dpy, format, max_modifiers, modifiers, external_only, n...
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:189
[INFO] [stdout]     |
[INFO] [stdout] 456 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputLayerAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:13
[INFO] [stdout]     |
[INFO] [stdout] 456 | ...   pub unsafe fn QueryOutputLayerAttribEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:347
[INFO] [stdout]     |
[INFO] [stdout] 456 | ...s::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputLayerAttribEXT.f)(dpy, layer, attribute, value) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:169
[INFO] [stdout]     |
[INFO] [stdout] 458 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryOutputLayerStringEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:13
[INFO] [stdout]     |
[INFO] [stdout] 458 | ...   pub unsafe fn QueryOutputLayerStringEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:319
[INFO] [stdout]     |
[INFO] [stdout] 458 | ...> *const __gl_imports::raw::c_char>(storage::QueryOutputLayerStringEXT.f)(dpy, layer, name) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:186
[INFO] [stdout]     |
[INFO] [stdout] 460 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputPortAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:13
[INFO] [stdout]     |
[INFO] [stdout] 460 | ...   pub unsafe fn QueryOutputPortAttribEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:343
[INFO] [stdout]     |
[INFO] [stdout] 460 | ...s::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputPortAttribEXT.f)(dpy, port, attribute, value) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:166
[INFO] [stdout]     |
[INFO] [stdout] 462 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryOutputPortStringEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:13
[INFO] [stdout]     |
[INFO] [stdout] 462 | ...   pub unsafe fn QueryOutputPortStringEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:315
[INFO] [stdout]     |
[INFO] [stdout] 462 | ...> *const __gl_imports::raw::c_char>(storage::QueryOutputPortStringEXT.f)(dpy, port, name) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:172
[INFO] [stdout]     |
[INFO] [stdout] 464 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:13
[INFO] [stdout]     |
[INFO] [stdout] 464 | ...   pub unsafe fn QueryStreamKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:323
[INFO] [stdout]     |
[INFO] [stdout] 464 | ...mut types::EGLint) -> types::EGLBoolean>(storage::QueryStreamKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:180
[INFO] [stdout]     |
[INFO] [stdout] 466 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLTimeKHR) -> types::EGLBoolean>(storage::QueryStreamTimeKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:13
[INFO] [stdout]     |
[INFO] [stdout] 466 | ...   pub unsafe fn QueryStreamTimeKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLTimeKHR) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:335
[INFO] [stdout]     |
[INFO] [stdout] 466 | ...pes::EGLTimeKHR) -> types::EGLBoolean>(storage::QueryStreamTimeKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:181
[INFO] [stdout]     |
[INFO] [stdout] 468 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLuint64KHR) -> types::EGLBoolean>(storage::QueryStreamu64KHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:13
[INFO] [stdout]     |
[INFO] [stdout] 468 | ...   pub unsafe fn QueryStreamu64KHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLuint64KHR) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:338
[INFO] [stdout]     |
[INFO] [stdout] 468 | ...es::EGLuint64KHR) -> types::EGLBoolean>(storage::QueryStreamu64KHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:122
[INFO] [stdout]     |
[INFO] [stdout] 470 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryString.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:13
[INFO] [stdout]     |
[INFO] [stdout] 470 | ...   pub unsafe fn QueryString(dpy: types::EGLDisplay, name: types::EGLint) -> *const __gl_imports::raw::c_char { __gl_imports::me...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:246
[INFO] [stdout]     |
[INFO] [stdout] 470 | ...Lint) -> *const __gl_imports::raw::c_char>(storage::QueryString.f)(dpy, name) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:168
[INFO] [stdout]     |
[INFO] [stdout] 472 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QuerySurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:13
[INFO] [stdout]     |
[INFO] [stdout] 472 | ...   pub unsafe fn QuerySurface(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:316
[INFO] [stdout]     |
[INFO] [stdout] 472 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::QuerySurface.f)(dpy, surface, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:141
[INFO] [stdout]     |
[INFO] [stdout] 474 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint) -> types::EGLBoolean>(storage::ReleaseTexImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:13
[INFO] [stdout]     |
[INFO] [stdout] 474 | ...   pub unsafe fn ReleaseTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:269
[INFO] [stdout]     |
[INFO] [stdout] 474 | ...ce, types::EGLint) -> types::EGLBoolean>(storage::ReleaseTexImage.f)(dpy, surface, buffer) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:66
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...LBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::ReleaseThread.f)() }
[INFO] [stdout]     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:13
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...   pub unsafe fn ReleaseThread() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBool...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:143
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...xtern "system" fn() -> types::EGLBoolean>(storage::ReleaseThread.f)() }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:168
[INFO] [stdout]     |
[INFO] [stdout] 478 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, types::EGLint) -> types::EGLBoolean>(storage::StreamAttribKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:13
[INFO] [stdout]     |
[INFO] [stdout] 478 | ...   pub unsafe fn StreamAttribKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:314
[INFO] [stdout]     |
[INFO] [stdout] 478 | ...um, types::EGLint) -> types::EGLBoolean>(storage::StreamAttribKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:160
[INFO] [stdout]     |
[INFO] [stdout] 480 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLOutputLayerEXT) -> types::EGLBoolean>(storage::StreamConsumerOutputEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:13
[INFO] [stdout]     |
[INFO] [stdout] 480 | ...   pub unsafe fn StreamConsumerOutputEXT(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, layer: types::EGLOutputLayerEXT) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:301
[INFO] [stdout]     |
[INFO] [stdout] 480 | ...utputLayerEXT) -> types::EGLBoolean>(storage::StreamConsumerOutputEXT.f)(dpy, stream, layer) }
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:164
[INFO] [stdout]     |
[INFO] [stdout] 482 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint, types::EGLint) -> types::EGLBoolean>(storage::SurfaceAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:13
[INFO] [stdout]     |
[INFO] [stdout] 482 | ...   pub unsafe fn SurfaceAttrib(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:307
[INFO] [stdout]     |
[INFO] [stdout] 482 | ...int, types::EGLint) -> types::EGLBoolean>(storage::SurfaceAttrib.f)(dpy, surface, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:114
[INFO] [stdout]     |
[INFO] [stdout] 484 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface) -> types::EGLBoolean>(storage::SwapBuffers.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:13
[INFO] [stdout]     |
[INFO] [stdout] 484 | ...   pub unsafe fn SwapBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean { __gl_imports::mem::trans...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:227
[INFO] [stdout]     |
[INFO] [stdout] 484 | ..., types::EGLSurface) -> types::EGLBoolean>(storage::SwapBuffers.f)(dpy, surface) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:112
[INFO] [stdout]     |
[INFO] [stdout] 486 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint) -> types::EGLBoolean>(storage::SwapInterval.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:13
[INFO] [stdout]     |
[INFO] [stdout] 486 | ...   pub unsafe fn SwapInterval(dpy: types::EGLDisplay, interval: types::EGLint) -> types::EGLBoolean { __gl_imports::mem::transmu...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:221
[INFO] [stdout]     |
[INFO] [stdout] 486 | ...lay, types::EGLint) -> types::EGLBoolean>(storage::SwapInterval.f)(dpy, interval) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:84
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...an { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay) -> types::EGLBoolean>(storage::Terminate.f)(dpy) }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:13
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...   pub unsafe fn Terminate(dpy: types::EGLDisplay) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(t...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:178
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...fn(types::EGLDisplay) -> types::EGLBoolean>(storage::Terminate.f)(dpy) }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:63
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...LBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::WaitClient.f)() }
[INFO] [stdout]     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:13
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...   pub unsafe fn WaitClient() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:140
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...extern "system" fn() -> types::EGLBoolean>(storage::WaitClient.f)() }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:59
[INFO] [stdout]     |
[INFO] [stdout] 492 | ...n { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::WaitGL.f)() }
[INFO] [stdout]     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:13
[INFO] [stdout]     |
[INFO] [stdout] 492 | ...   pub unsafe fn WaitGL() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(st...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:136
[INFO] [stdout]     |
[INFO] [stdout] 492 | ..., extern "system" fn() -> types::EGLBoolean>(storage::WaitGL.f)() }
[INFO] [stdout]     |                                                 ^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:84
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...lean { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint) -> types::EGLBoolean>(storage::WaitNative.f)(engine) }
[INFO] [stdout]     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:13
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...   pub unsafe fn WaitNative(engine: types::EGLint) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(t...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:174
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...m" fn(types::EGLint) -> types::EGLBoolean>(storage::WaitNative.f)(engine) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:127
[INFO] [stdout]     |
[INFO] [stdout] 496 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint) -> types::EGLBoolean>(storage::WaitSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:13
[INFO] [stdout]     |
[INFO] [stdout] 496 | ...   pub unsafe fn WaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint) -> types::EGLBoolean { __gl_import...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:252
[INFO] [stdout]     |
[INFO] [stdout] 496 | ...LSync, types::EGLint) -> types::EGLBoolean>(storage::WaitSync.f)(dpy, sync, flags) }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14845
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ch opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14673
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { ...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout]   = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14921
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...k (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => {...
[INFO] [stdout]   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:14956
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ce { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: ...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15036
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15114
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...ts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = ::...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15195
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...icated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , ...
[INFO] [stdout]   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]   |
[INFO] [stdout]   = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: access to union field is unsafe and requires unsafe block
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:15278
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...rgs , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , ...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^ access to union field
[INFO] [stdout]   |
[INFO] [stdout]   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:79
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...lean { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum) -> types::EGLBoolean>(storage::BindAPI.f)(api) }
[INFO] [stdout]     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:13
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...   pub unsafe fn BindAPI(api: types::EGLenum) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(types:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:352:170
[INFO] [stdout]     |
[INFO] [stdout] 352 | ...em" fn(types::EGLenum) -> types::EGLBoolean>(storage::BindAPI.f)(api) }
[INFO] [stdout]     |                                                 ^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:138
[INFO] [stdout]     |
[INFO] [stdout] 354 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint) -> types::EGLBoolean>(storage::BindTexImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:13
[INFO] [stdout]     |
[INFO] [stdout] 354 | ...   pub unsafe fn BindTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:354:266
[INFO] [stdout]     |
[INFO] [stdout] 354 | ...ace, types::EGLint) -> types::EGLBoolean>(storage::BindTexImage.f)(dpy, surface, buffer) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:214
[INFO] [stdout]     |
[INFO] [stdout] 356 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLint, *mut types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::ChooseConfig.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:13
[INFO] [stdout]     |
[INFO] [stdout] 356 | ...   pub unsafe fn ChooseConfig(dpy: types::EGLDisplay, attrib_list: *const types::EGLint, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:356:388
[INFO] [stdout]     |
[INFO] [stdout] 356 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::ChooseConfig.f)(dpy, attrib_list, configs, config_size, num_config) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:154
[INFO] [stdout]     |
[INFO] [stdout] 359 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint, types::EGLTime) -> types::EGLint>(storage::ClientWaitSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:13
[INFO] [stdout]     |
[INFO] [stdout] 359 | ...   pub unsafe fn ClientWaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint, timeout: types::EGLTime) -> types::EGLint { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:359:291
[INFO] [stdout]     |
[INFO] [stdout] 359 | ...GLint, types::EGLTime) -> types::EGLint>(storage::ClientWaitSync.f)(dpy, sync, flags, timeout) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:150
[INFO] [stdout]     |
[INFO] [stdout] 361 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLNativePixmapType) -> types::EGLBoolean>(storage::CopyBuffers.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:13
[INFO] [stdout]     |
[INFO] [stdout] 361 | ...   pub unsafe fn CopyBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface, target: types::EGLNativePixmapType) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:361:291
[INFO] [stdout]     |
[INFO] [stdout] 361 | ...EGLNativePixmapType) -> types::EGLBoolean>(storage::CopyBuffers.f)(dpy, surface, target) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:183
[INFO] [stdout]     |
[INFO] [stdout] 363 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLContext, *const types::EGLint) -> types::EGLContext>(storage::CreateContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:13
[INFO] [stdout]     |
[INFO] [stdout] 363 | ...   pub unsafe fn CreateContext(dpy: types::EGLDisplay, config: types::EGLConfig, share_context: types::EGLContext, attrib_list: *const types::EGLint) -> types::EGLContext { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:363:336
[INFO] [stdout]     |
[INFO] [stdout] 363 | ...onst types::EGLint) -> types::EGLContext>(storage::CreateContext.f)(dpy, config, share_context, attrib_list) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:202
[INFO] [stdout]     |
[INFO] [stdout] 365 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLenum, types::EGLClientBuffer, *const types::EGLAttrib) -> types::EGLImage>(storage::CreateImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:13
[INFO] [stdout]     |
[INFO] [stdout] 365 | ...   pub unsafe fn CreateImage(dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLAttrib) -> types::EGLImage { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:365:378
[INFO] [stdout]     |
[INFO] [stdout] 365 | ...onst types::EGLAttrib) -> types::EGLImage>(storage::CreateImage.f)(dpy, ctx, target, buffer, attrib_list) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:205
[INFO] [stdout]     |
[INFO] [stdout] 367 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLenum, types::EGLClientBuffer, *const types::EGLint) -> types::EGLImageKHR>(storage::CreateImageKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:13
[INFO] [stdout]     |
[INFO] [stdout] 367 | ...   pub unsafe fn CreateImageKHR(dpy: types::EGLDisplay, ctx: types::EGLContext, target: types::EGLenum, buffer: types::EGLClientBuffer, attrib_list: *const types::EGLint) -> types::EGLImageKHR { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:367:381
[INFO] [stdout]     |
[INFO] [stdout] 367 | ...st types::EGLint) -> types::EGLImageKHR>(storage::CreateImageKHR.f)(dpy, ctx, target, buffer, attrib_list) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:222
[INFO] [stdout]     |
[INFO] [stdout] 369 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLenum, types::EGLClientBuffer, types::EGLConfig, *const types::EGLint) -> types::EGLSurface>(storage::CreatePbufferFromClientBuffer.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:13
[INFO] [stdout]     |
[INFO] [stdout] 369 | ...   pub unsafe fn CreatePbufferFromClientBuffer(dpy: types::EGLDisplay, buftype: types::EGLenum, buffer: types::EGLClientBuffer, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:369:396
[INFO] [stdout]     |
[INFO] [stdout] 369 | ...es::EGLint) -> types::EGLSurface>(storage::CreatePbufferFromClientBuffer.f)(dpy, buftype, buffer, config, attrib_list) }
[INFO] [stdout]     |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:156
[INFO] [stdout]     |
[INFO] [stdout] 371 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *const types::EGLint) -> types::EGLSurface>(storage::CreatePbufferSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:13
[INFO] [stdout]     |
[INFO] [stdout] 371 | ...   pub unsafe fn CreatePbufferSurface(dpy: types::EGLDisplay, config: types::EGLConfig, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:371:290
[INFO] [stdout]     |
[INFO] [stdout] 371 | ... types::EGLint) -> types::EGLSurface>(storage::CreatePbufferSurface.f)(dpy, config, attrib_list) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:191
[INFO] [stdout]     |
[INFO] [stdout] 373 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLNativePixmapType, *const types::EGLint) -> types::EGLSurface>(storage::CreatePixmapSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:13
[INFO] [stdout]     |
[INFO] [stdout] 373 | ...   pub unsafe fn CreatePixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, pixmap: types::EGLNativePixmapType, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:373:353
[INFO] [stdout]     |
[INFO] [stdout] 373 | ...t types::EGLint) -> types::EGLSurface>(storage::CreatePixmapSurface.f)(dpy, config, pixmap, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:213
[INFO] [stdout]     |
[INFO] [stdout] 375 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformPixmapSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:13
[INFO] [stdout]     |
[INFO] [stdout] 375 | ...   pub unsafe fn CreatePlatformPixmapSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:375:382
[INFO] [stdout]     |
[INFO] [stdout] 375 | ...::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformPixmapSurface.f)(dpy, config, native_pixmap, attrib_list) }
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:213
[INFO] [stdout]     |
[INFO] [stdout] 377 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLSurface>(storage::CreatePlatformPixmapSurfaceEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:13
[INFO] [stdout]     |
[INFO] [stdout] 377 | ...   pub unsafe fn CreatePlatformPixmapSurfaceEXT(dpy: types::EGLDisplay, config: types::EGLConfig, native_pixmap: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:377:379
[INFO] [stdout]     |
[INFO] [stdout] 377 | ...s::EGLint) -> types::EGLSurface>(storage::CreatePlatformPixmapSurfaceEXT.f)(dpy, config, native_pixmap, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:213
[INFO] [stdout]     |
[INFO] [stdout] 379 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformWindowSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:13
[INFO] [stdout]     |
[INFO] [stdout] 379 | ...   pub unsafe fn CreatePlatformWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:379:382
[INFO] [stdout]     |
[INFO] [stdout] 379 | ...::EGLAttrib) -> types::EGLSurface>(storage::CreatePlatformWindowSurface.f)(dpy, config, native_window, attrib_list) }
[INFO] [stdout]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:213
[INFO] [stdout]     |
[INFO] [stdout] 381 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLSurface>(storage::CreatePlatformWindowSurfaceEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:13
[INFO] [stdout]     |
[INFO] [stdout] 381 | ...   pub unsafe fn CreatePlatformWindowSurfaceEXT(dpy: types::EGLDisplay, config: types::EGLConfig, native_window: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:381:379
[INFO] [stdout]     |
[INFO] [stdout] 381 | ...s::EGLint) -> types::EGLSurface>(storage::CreatePlatformWindowSurfaceEXT.f)(dpy, config, native_window, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:127
[INFO] [stdout]     |
[INFO] [stdout] 383 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLint) -> types::EGLStreamKHR>(storage::CreateStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:13
[INFO] [stdout]     |
[INFO] [stdout] 383 | ...   pub unsafe fn CreateStreamKHR(dpy: types::EGLDisplay, attrib_list: *const types::EGLint) -> types::EGLStreamKHR { __gl_import...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:383:245
[INFO] [stdout]     |
[INFO] [stdout] 383 | ...t types::EGLint) -> types::EGLStreamKHR>(storage::CreateStreamKHR.f)(dpy, attrib_list) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:195
[INFO] [stdout]     |
[INFO] [stdout] 385 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLStreamKHR, *const types::EGLint) -> types::EGLSurface>(storage::CreateStreamProducerSurfaceKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:13
[INFO] [stdout]     |
[INFO] [stdout] 385 | ...   pub unsafe fn CreateStreamProducerSurfaceKHR(dpy: types::EGLDisplay, config: types::EGLConfig, stream: types::EGLStreamKHR, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:385:350
[INFO] [stdout]     |
[INFO] [stdout] 385 | ...s::EGLint) -> types::EGLSurface>(storage::CreateStreamProducerSurfaceKHR.f)(dpy, config, stream, attrib_list) }
[INFO] [stdout]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:143
[INFO] [stdout]     |
[INFO] [stdout] 388 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLenum, *const types::EGLAttrib) -> types::EGLSync>(storage::CreateSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:13
[INFO] [stdout]     |
[INFO] [stdout] 388 | ...   pub unsafe fn CreateSync(dpy: types::EGLDisplay, type_: types::EGLenum, attrib_list: *const types::EGLAttrib) -> types::EGLSync { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:388:275
[INFO] [stdout]     |
[INFO] [stdout] 388 | ...const types::EGLAttrib) -> types::EGLSync>(storage::CreateSync.f)(dpy, type_, attrib_list) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:188
[INFO] [stdout]     |
[INFO] [stdout] 390 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLNativeWindowType, *const types::EGLint) -> types::EGLSurface>(storage::CreateWindowSurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:13
[INFO] [stdout]     |
[INFO] [stdout] 390 | ...   pub unsafe fn CreateWindowSurface(dpy: types::EGLDisplay, config: types::EGLConfig, win: types::EGLNativeWindowType, attrib_list: *const types::EGLint) -> types::EGLSurface { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:390:350
[INFO] [stdout]     |
[INFO] [stdout] 390 | ...t types::EGLint) -> types::EGLSurface>(storage::CreateWindowSurface.f)(dpy, config, win, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:113
[INFO] [stdout]     |
[INFO] [stdout] 392 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext) -> types::EGLBoolean>(storage::DestroyContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:13
[INFO] [stdout]     |
[INFO] [stdout] 392 | ...   pub unsafe fn DestroyContext(dpy: types::EGLDisplay, ctx: types::EGLContext) -> types::EGLBoolean { __gl_imports::mem::transm...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:392:226
[INFO] [stdout]     |
[INFO] [stdout] 392 | ...types::EGLContext) -> types::EGLBoolean>(storage::DestroyContext.f)(dpy, ctx) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:111
[INFO] [stdout]     |
[INFO] [stdout] 395 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLImage) -> types::EGLBoolean>(storage::DestroyImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:13
[INFO] [stdout]     |
[INFO] [stdout] 395 | ...   pub unsafe fn DestroyImage(dpy: types::EGLDisplay, image: types::EGLImage) -> types::EGLBoolean { __gl_imports::mem::transmut...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:395:222
[INFO] [stdout]     |
[INFO] [stdout] 395 | ...y, types::EGLImage) -> types::EGLBoolean>(storage::DestroyImage.f)(dpy, image) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:117
[INFO] [stdout]     |
[INFO] [stdout] 397 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLImageKHR) -> types::EGLBoolean>(storage::DestroyImageKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:13
[INFO] [stdout]     |
[INFO] [stdout] 397 | ...   pub unsafe fn DestroyImageKHR(dpy: types::EGLDisplay, image: types::EGLImageKHR) -> types::EGLBoolean { __gl_imports::mem::tr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:397:231
[INFO] [stdout]     |
[INFO] [stdout] 397 | ...ypes::EGLImageKHR) -> types::EGLBoolean>(storage::DestroyImageKHR.f)(dpy, image) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:120
[INFO] [stdout]     |
[INFO] [stdout] 399 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR) -> types::EGLBoolean>(storage::DestroyStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:13
[INFO] [stdout]     |
[INFO] [stdout] 399 | ...   pub unsafe fn DestroyStreamKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR) -> types::EGLBoolean { __gl_imports::mem:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:399:235
[INFO] [stdout]     |
[INFO] [stdout] 399 | ...es::EGLStreamKHR) -> types::EGLBoolean>(storage::DestroyStreamKHR.f)(dpy, stream) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:117
[INFO] [stdout]     |
[INFO] [stdout] 401 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface) -> types::EGLBoolean>(storage::DestroySurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:13
[INFO] [stdout]     |
[INFO] [stdout] 401 | ...   pub unsafe fn DestroySurface(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean { __gl_imports::mem::tr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:401:230
[INFO] [stdout]     |
[INFO] [stdout] 401 | ...types::EGLSurface) -> types::EGLBoolean>(storage::DestroySurface.f)(dpy, surface) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:108
[INFO] [stdout]     |
[INFO] [stdout] 404 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync) -> types::EGLBoolean>(storage::DestroySync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:13
[INFO] [stdout]     |
[INFO] [stdout] 404 | ...   pub unsafe fn DestroySync(dpy: types::EGLDisplay, sync: types::EGLSync) -> types::EGLBoolean { __gl_imports::mem::transmute::...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:404:218
[INFO] [stdout]     |
[INFO] [stdout] 404 | ...lay, types::EGLSync) -> types::EGLBoolean>(storage::DestroySync.f)(dpy, sync) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:169
[INFO] [stdout]     |
[INFO] [stdout] 406 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:13
[INFO] [stdout]     |
[INFO] [stdout] 406 | ...   pub unsafe fn GetConfigAttrib(dpy: types::EGLDisplay, config: types::EGLConfig, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:406:316
[INFO] [stdout]     |
[INFO] [stdout] 406 | ...mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigAttrib.f)(dpy, config, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:177
[INFO] [stdout]     |
[INFO] [stdout] 408 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *mut types::EGLConfig, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigs.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:13
[INFO] [stdout]     |
[INFO] [stdout] 408 | ...   pub unsafe fn GetConfigs(dpy: types::EGLDisplay, configs: *mut types::EGLConfig, config_size: types::EGLint, num_config: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:408:329
[INFO] [stdout]     |
[INFO] [stdout] 408 | ... *mut types::EGLint) -> types::EGLBoolean>(storage::GetConfigs.f)(dpy, configs, config_size, num_config) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:70
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...ontext { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLContext>(storage::GetCurrentContext.f)() }
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:13
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...   pub unsafe fn GetCurrentContext() -> types::EGLContext { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGL...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:410:147
[INFO] [stdout]     |
[INFO] [stdout] 410 | ...ern "system" fn() -> types::EGLContext>(storage::GetCurrentContext.f)() }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:70
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...isplay { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLDisplay>(storage::GetCurrentDisplay.f)() }
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:13
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...   pub unsafe fn GetCurrentDisplay() -> types::EGLDisplay { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGL...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:412:147
[INFO] [stdout]     |
[INFO] [stdout] 412 | ...ern "system" fn() -> types::EGLDisplay>(storage::GetCurrentDisplay.f)() }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:93
[INFO] [stdout]     |
[INFO] [stdout] 414 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint) -> types::EGLSurface>(storage::GetCurrentSurface.f)(readd...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:13
[INFO] [stdout]     |
[INFO] [stdout] 414 | ...   pub unsafe fn GetCurrentSurface(readdraw: types::EGLint) -> types::EGLSurface { __gl_imports::mem::transmute::<_, extern "sys...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:414:183
[INFO] [stdout]     |
[INFO] [stdout] 414 | ...fn(types::EGLint) -> types::EGLSurface>(storage::GetCurrentSurface.f)(readdraw) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:102
[INFO] [stdout]     |
[INFO] [stdout] 416 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLNativeDisplayType) -> types::EGLDisplay>(storage::GetDisplay.f)(di...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:13
[INFO] [stdout]     |
[INFO] [stdout] 416 | ...   pub unsafe fn GetDisplay(display_id: types::EGLNativeDisplayType) -> types::EGLDisplay { __gl_imports::mem::transmute::<_, ex...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:416:206
[INFO] [stdout]     |
[INFO] [stdout] 416 | ...GLNativeDisplayType) -> types::EGLDisplay>(storage::GetDisplay.f)(display_id) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:57
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...nt { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLint>(storage::GetError.f)() }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:13
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...   pub unsafe fn GetError() -> types::EGLint { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLint>(storage:...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:418:130
[INFO] [stdout]     |
[INFO] [stdout] 418 | ...:<_, extern "system" fn() -> types::EGLint>(storage::GetError.f)() }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:229
[INFO] [stdout]     |
[INFO] [stdout] 420 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLAttrib, *mut types::EGLOutputLayerEXT, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetOutputLayersEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:13
[INFO] [stdout]     |
[INFO] [stdout] 420 | ...   pub unsafe fn GetOutputLayersEXT(dpy: types::EGLDisplay, attrib_list: *const types::EGLAttrib, layers: *mut types::EGLOutputLayerEXT, max_layers: types::EGLint, num_layers: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:420:414
[INFO] [stdout]     |
[INFO] [stdout] 420 | ...t types::EGLint) -> types::EGLBoolean>(storage::GetOutputLayersEXT.f)(dpy, attrib_list, layers, max_layers, num_layers) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: variable does not need to be mutable
[INFO] [stdout]   --> src/main.rs:89:9
[INFO] [stdout]    |
[INFO] [stdout] 89 |     let mut state: &mut WaylandState = data.get().unwrap();
[INFO] [stdout]    |         ----^^^^^
[INFO] [stdout]    |         |
[INFO] [stdout]    |         help: remove this `mut`
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:224
[INFO] [stdout]     |
[INFO] [stdout] 422 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *const types::EGLAttrib, *mut types::EGLOutputPortEXT, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::GetOutputPortsEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:13
[INFO] [stdout]     |
[INFO] [stdout] 422 | ...   pub unsafe fn GetOutputPortsEXT(dpy: types::EGLDisplay, attrib_list: *const types::EGLAttrib, ports: *mut types::EGLOutputPortEXT, max_ports: types::EGLint, num_ports: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:422:408
[INFO] [stdout]     |
[INFO] [stdout] 422 | ...ut types::EGLint) -> types::EGLBoolean>(storage::GetOutputPortsEXT.f)(dpy, attrib_list, ports, max_ports, num_ports) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:181
[INFO] [stdout]     |
[INFO] [stdout] 424 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum, *mut __gl_imports::raw::c_void, *const types::EGLAttrib) -> types::EGLDisplay>(storage::GetPlatformDisplay.f)(pl...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:13
[INFO] [stdout]     |
[INFO] [stdout] 424 | ...   pub unsafe fn GetPlatformDisplay(platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLAttrib) -> types::EGLDisplay { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:424:329
[INFO] [stdout]     |
[INFO] [stdout] 424 | ...ypes::EGLAttrib) -> types::EGLDisplay>(storage::GetPlatformDisplay.f)(platform, native_display, attrib_list) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:181
[INFO] [stdout]     |
[INFO] [stdout] 426 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLenum, *mut __gl_imports::raw::c_void, *const types::EGLint) -> types::EGLDisplay>(storage::GetPlatformDisplayEXT.f)(pl...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:13
[INFO] [stdout]     |
[INFO] [stdout] 426 | ...   pub unsafe fn GetPlatformDisplayEXT(platform: types::EGLenum, native_display: *mut __gl_imports::raw::c_void, attrib_list: *const types::EGLint) -> types::EGLDisplay { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16253
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:426:326
[INFO] [stdout]     |
[INFO] [stdout] 426 | ... types::EGLint) -> types::EGLDisplay>(storage::GetPlatformDisplayEXT.f)(platform, native_display, attrib_list) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:139
[INFO] [stdout]     |
[INFO] [stdout] 428 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(*const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType>(storage::GetProcAddress.f)(pr...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:13
[INFO] [stdout]     |
[INFO] [stdout] 428 | ...   pub unsafe fn GetProcAddress(procname: *const __gl_imports::raw::c_char) -> types::__eglMustCastToProperFunctionPointerType { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:428:278
[INFO] [stdout]     |
[INFO] [stdout] 428 | ..._eglMustCastToProperFunctionPointerType>(storage::GetProcAddress.f)(procname) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:166
[INFO] [stdout]     |
[INFO] [stdout] 430 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::GetSyncAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:13
[INFO] [stdout]     |
[INFO] [stdout] 430 | ...   pub unsafe fn GetSyncAttrib(dpy: types::EGLDisplay, sync: types::EGLSync, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:430:314
[INFO] [stdout]     |
[INFO] [stdout] 430 | ...t types::EGLAttrib) -> types::EGLBoolean>(storage::GetSyncAttrib.f)(dpy, sync, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:139
[INFO] [stdout]     |
[INFO] [stdout] 432 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, *mut types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::Initialize.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:13
[INFO] [stdout]     |
[INFO] [stdout] 432 | ...   pub unsafe fn Initialize(dpy: types::EGLDisplay, major: *mut types::EGLint, minor: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:432:273
[INFO] [stdout]     |
[INFO] [stdout] 432 | ... *mut types::EGLint) -> types::EGLBoolean>(storage::Initialize.f)(dpy, major, minor) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:160
[INFO] [stdout]     |
[INFO] [stdout] 434 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLSurface, types::EGLContext) -> types::EGLBoolean>(storage::MakeCurrent.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:13
[INFO] [stdout]     |
[INFO] [stdout] 434 | ...   pub unsafe fn MakeCurrent(dpy: types::EGLDisplay, draw: types::EGLSurface, read: types::EGLSurface, ctx: types::EGLContext) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:434:311
[INFO] [stdout]     |
[INFO] [stdout] 434 | ..., types::EGLContext) -> types::EGLBoolean>(storage::MakeCurrent.f)(dpy, draw, read, ctx) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:179
[INFO] [stdout]     |
[INFO] [stdout] 436 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint, types::EGLAttrib) -> types::EGLBoolean>(storage::OutputLayerAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:13
[INFO] [stdout]     |
[INFO] [stdout] 436 | ...   pub unsafe fn OutputLayerAttribEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, attribute: types::EGLint, value: types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:436:332
[INFO] [stdout]     |
[INFO] [stdout] 436 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::OutputLayerAttribEXT.f)(dpy, layer, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:176
[INFO] [stdout]     |
[INFO] [stdout] 438 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint, types::EGLAttrib) -> types::EGLBoolean>(storage::OutputPortAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:13
[INFO] [stdout]     |
[INFO] [stdout] 438 | ...   pub unsafe fn OutputPortAttribEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, attribute: types::EGLint, value: types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18892
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:438:328
[INFO] [stdout]     |
[INFO] [stdout] 438 | ...ypes::EGLAttrib) -> types::EGLBoolean>(storage::OutputPortAttribEXT.f)(dpy, port, attribute, value) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:58
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...um { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLenum>(storage::QueryAPI.f)() }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:13
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...   pub unsafe fn QueryAPI() -> types::EGLenum { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLenum>(storag...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:440:132
[INFO] [stdout]     |
[INFO] [stdout] 440 | ...<_, extern "system" fn() -> types::EGLenum>(storage::QueryAPI.f)() }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:164
[INFO] [stdout]     |
[INFO] [stdout] 442 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLContext, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryContext.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:13
[INFO] [stdout]     |
[INFO] [stdout] 442 | ...   pub unsafe fn QueryContext(dpy: types::EGLDisplay, ctx: types::EGLContext, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:442:312
[INFO] [stdout]     |
[INFO] [stdout] 442 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::QueryContext.f)(dpy, ctx, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:156
[INFO] [stdout]     |
[INFO] [stdout] 444 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDeviceEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryDeviceAttribEXT.f)(de...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:13
[INFO] [stdout]     |
[INFO] [stdout] 444 | ...   pub unsafe fn QueryDeviceAttribEXT(device: types::EGLDeviceEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:444:290
[INFO] [stdout]     |
[INFO] [stdout] 444 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::QueryDeviceAttribEXT.f)(device, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:136
[INFO] [stdout]     |
[INFO] [stdout] 446 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDeviceEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryDeviceStringEXT.f)(de...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:13
[INFO] [stdout]     |
[INFO] [stdout] 446 | ...   pub unsafe fn QueryDeviceStringEXT(device: types::EGLDeviceEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { __...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:446:262
[INFO] [stdout]     |
[INFO] [stdout] 446 | ... -> *const __gl_imports::raw::c_char>(storage::QueryDeviceStringEXT.f)(device, name) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:162
[INFO] [stdout]     |
[INFO] [stdout] 448 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint, *mut types::EGLDeviceEXT, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDevicesEXT.f)(ma...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:13
[INFO] [stdout]     |
[INFO] [stdout] 448 | ...   pub unsafe fn QueryDevicesEXT(max_devices: types::EGLint, devices: *mut types::EGLDeviceEXT, num_devices: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:448:298
[INFO] [stdout]     |
[INFO] [stdout] 448 | ...mut types::EGLint) -> types::EGLBoolean>(storage::QueryDevicesEXT.f)(max_devices, devices, num_devices) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:152
[INFO] [stdout]     |
[INFO] [stdout] 450 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryDisplayAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:13
[INFO] [stdout]     |
[INFO] [stdout] 450 | ...   pub unsafe fn QueryDisplayAttribEXT(dpy: types::EGLDisplay, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:450:284
[INFO] [stdout]     |
[INFO] [stdout] 450 | ...pes::EGLAttrib) -> types::EGLBoolean>(storage::QueryDisplayAttribEXT.f)(dpy, attribute, value) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:186
[INFO] [stdout]     |
[INFO] [stdout] 452 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, *mut types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufFormatsEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:13
[INFO] [stdout]     |
[INFO] [stdout] 452 | ...   pub unsafe fn QueryDmaBufFormatsEXT(dpy: types::EGLDisplay, max_formats: types::EGLint, formats: *mut types::EGLint, num_formats: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:452:335
[INFO] [stdout]     |
[INFO] [stdout] 452 | ... types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufFormatsEXT.f)(dpy, max_formats, formats, num_formats) }
[INFO] [stdout]     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:262
[INFO] [stdout]     |
[INFO] [stdout] 454 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint, types::EGLint, *mut types::EGLuint64KHR, *mut types::EGLBoolean, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufModifiersEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:13
[INFO] [stdout]     |
[INFO] [stdout] 454 | ...   pub unsafe fn QueryDmaBufModifiersEXT(dpy: types::EGLDisplay, format: types::EGLint, max_modifiers: types::EGLint, modifiers: *mut types::EGLuint64KHR, external_only: *mut types::EGLBoolean, num_modifiers: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:454:456
[INFO] [stdout]     |
[INFO] [stdout] 454 | ...types::EGLint) -> types::EGLBoolean>(storage::QueryDmaBufModifiersEXT.f)(dpy, format, max_modifiers, modifiers, external_only, n...
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:189
[INFO] [stdout]     |
[INFO] [stdout] 456 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputLayerAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:13
[INFO] [stdout]     |
[INFO] [stdout] 456 | ...   pub unsafe fn QueryOutputLayerAttribEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:456:347
[INFO] [stdout]     |
[INFO] [stdout] 456 | ...s::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputLayerAttribEXT.f)(dpy, layer, attribute, value) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19233
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:169
[INFO] [stdout]     |
[INFO] [stdout] 458 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputLayerEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryOutputLayerStringEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:13
[INFO] [stdout]     |
[INFO] [stdout] 458 | ...   pub unsafe fn QueryOutputLayerStringEXT(dpy: types::EGLDisplay, layer: types::EGLOutputLayerEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:458:319
[INFO] [stdout]     |
[INFO] [stdout] 458 | ...> *const __gl_imports::raw::c_char>(storage::QueryOutputLayerStringEXT.f)(dpy, layer, name) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:186
[INFO] [stdout]     |
[INFO] [stdout] 460 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint, *mut types::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputPortAttribEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:13
[INFO] [stdout]     |
[INFO] [stdout] 460 | ...   pub unsafe fn QueryOutputPortAttribEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, attribute: types::EGLint, value: *mut types::EGLAttrib) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:460:343
[INFO] [stdout]     |
[INFO] [stdout] 460 | ...s::EGLAttrib) -> types::EGLBoolean>(storage::QueryOutputPortAttribEXT.f)(dpy, port, attribute, value) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:166
[INFO] [stdout]     |
[INFO] [stdout] 462 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLOutputPortEXT, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryOutputPortStringEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:13
[INFO] [stdout]     |
[INFO] [stdout] 462 | ...   pub unsafe fn QueryOutputPortStringEXT(dpy: types::EGLDisplay, port: types::EGLOutputPortEXT, name: types::EGLint) -> *const __gl_imports::raw::c_char { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:462:315
[INFO] [stdout]     |
[INFO] [stdout] 462 | ...> *const __gl_imports::raw::c_char>(storage::QueryOutputPortStringEXT.f)(dpy, port, name) }
[INFO] [stdout]     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:172
[INFO] [stdout]     |
[INFO] [stdout] 464 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLint) -> types::EGLBoolean>(storage::QueryStreamKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:13
[INFO] [stdout]     |
[INFO] [stdout] 464 | ...   pub unsafe fn QueryStreamKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:464:323
[INFO] [stdout]     |
[INFO] [stdout] 464 | ...mut types::EGLint) -> types::EGLBoolean>(storage::QueryStreamKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:180
[INFO] [stdout]     |
[INFO] [stdout] 466 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLTimeKHR) -> types::EGLBoolean>(storage::QueryStreamTimeKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:13
[INFO] [stdout]     |
[INFO] [stdout] 466 | ...   pub unsafe fn QueryStreamTimeKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLTimeKHR) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:466:335
[INFO] [stdout]     |
[INFO] [stdout] 466 | ...pes::EGLTimeKHR) -> types::EGLBoolean>(storage::QueryStreamTimeKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:181
[INFO] [stdout]     |
[INFO] [stdout] 468 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, *mut types::EGLuint64KHR) -> types::EGLBoolean>(storage::QueryStreamu64KHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:13
[INFO] [stdout]     |
[INFO] [stdout] 468 | ...   pub unsafe fn QueryStreamu64KHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: *mut types::EGLuint64KHR) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:468:338
[INFO] [stdout]     |
[INFO] [stdout] 468 | ...es::EGLuint64KHR) -> types::EGLBoolean>(storage::QueryStreamu64KHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:122
[INFO] [stdout]     |
[INFO] [stdout] 470 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint) -> *const __gl_imports::raw::c_char>(storage::QueryString.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:13
[INFO] [stdout]     |
[INFO] [stdout] 470 | ...   pub unsafe fn QueryString(dpy: types::EGLDisplay, name: types::EGLint) -> *const __gl_imports::raw::c_char { __gl_imports::me...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:470:246
[INFO] [stdout]     |
[INFO] [stdout] 470 | ...Lint) -> *const __gl_imports::raw::c_char>(storage::QueryString.f)(dpy, name) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:168
[INFO] [stdout]     |
[INFO] [stdout] 472 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint, *mut types::EGLint) -> types::EGLBoolean>(storage::QuerySurface.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:13
[INFO] [stdout]     |
[INFO] [stdout] 472 | ...   pub unsafe fn QuerySurface(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: *mut types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19743
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:472:316
[INFO] [stdout]     |
[INFO] [stdout] 472 | ...*mut types::EGLint) -> types::EGLBoolean>(storage::QuerySurface.f)(dpy, surface, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:141
[INFO] [stdout]     |
[INFO] [stdout] 474 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint) -> types::EGLBoolean>(storage::ReleaseTexImage.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:13
[INFO] [stdout]     |
[INFO] [stdout] 474 | ...   pub unsafe fn ReleaseTexImage(dpy: types::EGLDisplay, surface: types::EGLSurface, buffer: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:474:269
[INFO] [stdout]     |
[INFO] [stdout] 474 | ...ce, types::EGLint) -> types::EGLBoolean>(storage::ReleaseTexImage.f)(dpy, surface, buffer) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:66
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...LBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::ReleaseThread.f)() }
[INFO] [stdout]     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:13
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...   pub unsafe fn ReleaseThread() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBool...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:476:143
[INFO] [stdout]     |
[INFO] [stdout] 476 | ...xtern "system" fn() -> types::EGLBoolean>(storage::ReleaseThread.f)() }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:168
[INFO] [stdout]     |
[INFO] [stdout] 478 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLenum, types::EGLint) -> types::EGLBoolean>(storage::StreamAttribKHR.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:13
[INFO] [stdout]     |
[INFO] [stdout] 478 | ...   pub unsafe fn StreamAttribKHR(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, attribute: types::EGLenum, value: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:478:314
[INFO] [stdout]     |
[INFO] [stdout] 478 | ...um, types::EGLint) -> types::EGLBoolean>(storage::StreamAttribKHR.f)(dpy, stream, attribute, value) }
[INFO] [stdout]     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:160
[INFO] [stdout]     |
[INFO] [stdout] 480 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLStreamKHR, types::EGLOutputLayerEXT) -> types::EGLBoolean>(storage::StreamConsumerOutputEXT.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:13
[INFO] [stdout]     |
[INFO] [stdout] 480 | ...   pub unsafe fn StreamConsumerOutputEXT(dpy: types::EGLDisplay, stream: types::EGLStreamKHR, layer: types::EGLOutputLayerEXT) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:480:301
[INFO] [stdout]     |
[INFO] [stdout] 480 | ...utputLayerEXT) -> types::EGLBoolean>(storage::StreamConsumerOutputEXT.f)(dpy, stream, layer) }
[INFO] [stdout]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:164
[INFO] [stdout]     |
[INFO] [stdout] 482 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface, types::EGLint, types::EGLint) -> types::EGLBoolean>(storage::SurfaceAttrib.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:13
[INFO] [stdout]     |
[INFO] [stdout] 482 | ...   pub unsafe fn SurfaceAttrib(dpy: types::EGLDisplay, surface: types::EGLSurface, attribute: types::EGLint, value: types::EGLint) -> types::EGLBoolean { ...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:482:307
[INFO] [stdout]     |
[INFO] [stdout] 482 | ...int, types::EGLint) -> types::EGLBoolean>(storage::SurfaceAttrib.f)(dpy, surface, attribute, value) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:114
[INFO] [stdout]     |
[INFO] [stdout] 484 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSurface) -> types::EGLBoolean>(storage::SwapBuffers.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:13
[INFO] [stdout]     |
[INFO] [stdout] 484 | ...   pub unsafe fn SwapBuffers(dpy: types::EGLDisplay, surface: types::EGLSurface) -> types::EGLBoolean { __gl_imports::mem::trans...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:484:227
[INFO] [stdout]     |
[INFO] [stdout] 484 | ..., types::EGLSurface) -> types::EGLBoolean>(storage::SwapBuffers.f)(dpy, surface) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:112
[INFO] [stdout]     |
[INFO] [stdout] 486 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLint) -> types::EGLBoolean>(storage::SwapInterval.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:13
[INFO] [stdout]     |
[INFO] [stdout] 486 | ...   pub unsafe fn SwapInterval(dpy: types::EGLDisplay, interval: types::EGLint) -> types::EGLBoolean { __gl_imports::mem::transmu...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:486:221
[INFO] [stdout]     |
[INFO] [stdout] 486 | ...lay, types::EGLint) -> types::EGLBoolean>(storage::SwapInterval.f)(dpy, interval) }
[INFO] [stdout]     |                                              ^^^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:84
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...an { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay) -> types::EGLBoolean>(storage::Terminate.f)(dpy) }
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:13
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...   pub unsafe fn Terminate(dpy: types::EGLDisplay) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(t...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:488:178
[INFO] [stdout]     |
[INFO] [stdout] 488 | ...fn(types::EGLDisplay) -> types::EGLBoolean>(storage::Terminate.f)(dpy) }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:63
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...LBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::WaitClient.f)() }
[INFO] [stdout]     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:13
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...   pub unsafe fn WaitClient() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:490:140
[INFO] [stdout]     |
[INFO] [stdout] 490 | ...extern "system" fn() -> types::EGLBoolean>(storage::WaitClient.f)() }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:59
[INFO] [stdout]     |
[INFO] [stdout] 492 | ...n { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(storage::WaitGL.f)() }
[INFO] [stdout]     |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:13
[INFO] [stdout]     |
[INFO] [stdout] 492 | ...   pub unsafe fn WaitGL() -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn() -> types::EGLBoolean>(st...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:492:136
[INFO] [stdout]     |
[INFO] [stdout] 492 | ..., extern "system" fn() -> types::EGLBoolean>(storage::WaitGL.f)() }
[INFO] [stdout]     |                                                 ^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:84
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...lean { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLint) -> types::EGLBoolean>(storage::WaitNative.f)(engine) }
[INFO] [stdout]     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:13
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...   pub unsafe fn WaitNative(engine: types::EGLint) -> types::EGLBoolean { __gl_imports::mem::transmute::<_, extern "system" fn(t...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20431
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:494:174
[INFO] [stdout]     |
[INFO] [stdout] 494 | ...m" fn(types::EGLint) -> types::EGLBoolean>(storage::WaitNative.f)(engine) }
[INFO] [stdout]     |                                               ^^^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:127
[INFO] [stdout]     |
[INFO] [stdout] 496 | ... { __gl_imports::mem::transmute::<_, extern "system" fn(types::EGLDisplay, types::EGLSync, types::EGLint) -> types::EGLBoolean>(storage::WaitSync.f)(dp...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
[INFO] [stdout]     |
[INFO] [stdout]     = note: consult the function's documentation for information on how to avoid undefined behavior
[INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:13
[INFO] [stdout]     |
[INFO] [stdout] 496 | ...   pub unsafe fn WaitSync(dpy: types::EGLDisplay, sync: types::EGLSync, flags: types::EGLint) -> types::EGLBoolean { __gl_import...
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block
[INFO] [stdout]    --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/egl_bindings.rs:496:252
[INFO] [stdout]     |
[INFO] [stdout] 496 | ...LSync, types::EGLint) -> types::EGLBoolean>(storage::WaitSync.f)(dpy, sync, flags) }
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^ use of mutable static
[INFO] [stdout]     |
[INFO] [stdout]     = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20613
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20832
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21058
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21391
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21561
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21737
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21913
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22183
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22254
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0133`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `nvscreencopy` (bin "nvscreencopy" test) due to 14 previous errors; 150 warnings emitted
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] warning: variable does not need to be mutable
[INFO] [stdout]   --> src/main.rs:89:9
[INFO] [stdout]    |
[INFO] [stdout] 89 |     let mut state: &mut WaylandState = data.get().unwrap();
[INFO] [stdout]    |         ----^^^^^
[INFO] [stdout]    |         |
[INFO] [stdout]    |         help: remove this `mut`
[INFO] [stdout]    |
[INFO] [stdout]    = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:16253
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...() -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -...
[INFO] [stdout]   |                                          ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout]   = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { &raw const wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:18892
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...nterface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19233
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:19743
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...terface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { &raw const super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20431
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20613
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...st c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer...
[INFO] [stdout]   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:20832
[INFO] [stdout]   |
[INFO] [stdout] 1 | ..._char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buff...
[INFO] [stdout]   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21058
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the ...
[INFO] [stdout]   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { &raw const wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21391
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * cons...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21561
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21737
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:21913
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for ...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { &raw const types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22183
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...equest_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as *...
[INFO] [stdout]   |                                           ^^^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { &raw const wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: creating a shared reference to mutable static
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/nvscreencopy-ef024fe2c3ae43dd/out/drm.rs:1:22254
[INFO] [stdout]   |
[INFO] [stdout] 1 | ...} , event_count : 4 , events : unsafe { & wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                            ^^^^^^^^^^^^^^^ shared reference to mutable static
[INFO] [stdout]   |
[INFO] [stdout]   = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
[INFO] [stdout]   = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
[INFO] [stdout] help: use `&raw const` instead to create a raw pointer
[INFO] [stdout]   |
[INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [* const sys :: common :: wl_interface ; 1] = [NULLPTR as * const sys :: common :: wl_interface ,] ; pub mod wl_drm { use std :: os :: raw :: c_char ; use super :: { Proxy , AnonymousObject , Interface , MessageGroup , MessageDesc , ArgumentType , Object , Message , Argument , ObjectMetadata , types_null , NULLPTR , Main , smallvec , } ; use super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message } ; use super :: sys :: client :: * ; # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Error { AuthenticateFail = 0 , InvalidFormat = 1 , InvalidName = 2 , } impl Error { pub fn from_raw (n : u32) -> Option < Error > { match n { 0 => Some (Error :: AuthenticateFail) , 1 => Some (Error :: InvalidFormat) , 2 => Some (Error :: InvalidName) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Format { C8 = 538982467 , Rgb332 = 943867730 , Bgr233 = 944916290 , Xrgb4444 = 842093144 , Xbgr4444 = 842089048 , Rgbx4444 = 842094674 , Bgrx4444 = 842094658 , Argb4444 = 842093121 , Abgr4444 = 842089025 , Rgba4444 = 842088786 , Bgra4444 = 842088770 , Xrgb1555 = 892424792 , Xbgr1555 = 892420696 , Rgbx5551 = 892426322 , Bgrx5551 = 892426306 , Argb1555 = 892424769 , Abgr1555 = 892420673 , Rgba5551 = 892420434 , Bgra5551 = 892420418 , Rgb565 = 909199186 , Bgr565 = 909199170 , Rgb888 = 875710290 , Bgr888 = 875710274 , Xrgb8888 = 875713112 , Xbgr8888 = 875709016 , Rgbx8888 = 875714642 , Bgrx8888 = 875714626 , Argb8888 = 875713089 , Abgr8888 = 875708993 , Rgba8888 = 875708754 , Bgra8888 = 875708738 , Xrgb2101010 = 808669784 , Xbgr2101010 = 808665688 , Rgbx1010102 = 808671314 , Bgrx1010102 = 808671298 , Argb2101010 = 808669761 , Abgr2101010 = 808665665 , Rgba1010102 = 808665426 , Bgra1010102 = 808665410 , Yuyv = 1448695129 , Yvyu = 1431918169 , Uyvy = 1498831189 , Vyuy = 1498765654 , Ayuv = 1448433985 , Xyuv8888 = 1448434008 , Nv12 = 842094158 , Nv21 = 825382478 , Nv16 = 909203022 , Nv61 = 825644622 , Yuv410 = 961959257 , Yvu410 = 961893977 , Yuv411 = 825316697 , Yvu411 = 825316953 , Yuv420 = 842093913 , Yvu420 = 842094169 , Yuv422 = 909202777 , Yvu422 = 909203033 , Yuv444 = 875713881 , Yvu444 = 875714137 , Abgr16f = 1211384385 , Xbgr16f = 1211384408 , } impl Format { pub fn from_raw (n : u32) -> Option < Format > { match n { 538982467 => Some (Format :: C8) , 943867730 => Some (Format :: Rgb332) , 944916290 => Some (Format :: Bgr233) , 842093144 => Some (Format :: Xrgb4444) , 842089048 => Some (Format :: Xbgr4444) , 842094674 => Some (Format :: Rgbx4444) , 842094658 => Some (Format :: Bgrx4444) , 842093121 => Some (Format :: Argb4444) , 842089025 => Some (Format :: Abgr4444) , 842088786 => Some (Format :: Rgba4444) , 842088770 => Some (Format :: Bgra4444) , 892424792 => Some (Format :: Xrgb1555) , 892420696 => Some (Format :: Xbgr1555) , 892426322 => Some (Format :: Rgbx5551) , 892426306 => Some (Format :: Bgrx5551) , 892424769 => Some (Format :: Argb1555) , 892420673 => Some (Format :: Abgr1555) , 892420434 => Some (Format :: Rgba5551) , 892420418 => Some (Format :: Bgra5551) , 909199186 => Some (Format :: Rgb565) , 909199170 => Some (Format :: Bgr565) , 875710290 => Some (Format :: Rgb888) , 875710274 => Some (Format :: Bgr888) , 875713112 => Some (Format :: Xrgb8888) , 875709016 => Some (Format :: Xbgr8888) , 875714642 => Some (Format :: Rgbx8888) , 875714626 => Some (Format :: Bgrx8888) , 875713089 => Some (Format :: Argb8888) , 875708993 => Some (Format :: Abgr8888) , 875708754 => Some (Format :: Rgba8888) , 875708738 => Some (Format :: Bgra8888) , 808669784 => Some (Format :: Xrgb2101010) , 808665688 => Some (Format :: Xbgr2101010) , 808671314 => Some (Format :: Rgbx1010102) , 808671298 => Some (Format :: Bgrx1010102) , 808669761 => Some (Format :: Argb2101010) , 808665665 => Some (Format :: Abgr2101010) , 808665426 => Some (Format :: Rgba1010102) , 808665410 => Some (Format :: Bgra1010102) , 1448695129 => Some (Format :: Yuyv) , 1431918169 => Some (Format :: Yvyu) , 1498831189 => Some (Format :: Uyvy) , 1498765654 => Some (Format :: Vyuy) , 1448433985 => Some (Format :: Ayuv) , 1448434008 => Some (Format :: Xyuv8888) , 842094158 => Some (Format :: Nv12) , 825382478 => Some (Format :: Nv21) , 909203022 => Some (Format :: Nv16) , 825644622 => Some (Format :: Nv61) , 961959257 => Some (Format :: Yuv410) , 961893977 => Some (Format :: Yvu410) , 825316697 => Some (Format :: Yuv411) , 825316953 => Some (Format :: Yvu411) , 842093913 => Some (Format :: Yuv420) , 842094169 => Some (Format :: Yvu420) , 909202777 => Some (Format :: Yuv422) , 909203033 => Some (Format :: Yvu422) , 875713881 => Some (Format :: Yuv444) , 875714137 => Some (Format :: Yvu444) , 1211384385 => Some (Format :: Abgr16f) , 1211384408 => Some (Format :: Xbgr16f) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [doc = "wl_drm capability bitmask\n\nBitmask of capabilities."] # [repr (u32)] # [derive (Copy , Clone , Debug , PartialEq)] # [non_exhaustive] pub enum Capability { # [doc = "wl_drm prime available"] Prime = 1 , } impl Capability { pub fn from_raw (n : u32) -> Option < Capability > { match n { 1 => Some (Capability :: Prime) , _ => Option :: None } } pub fn to_raw (& self) -> u32 { * self as u32 } } # [derive (Debug)] # [non_exhaustive] pub enum Request { # [doc = ""] Authenticate { id : u32 , } , # [doc = ""] CreateBuffer { name : u32 , width : i32 , height : i32 , stride : u32 , format : u32 , } , # [doc = ""] CreatePlanarBuffer { name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , # [doc = "Only available since version 2 of the interface"] CreatePrimeBuffer { name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32 , } , } impl super :: MessageGroup for Request { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "authenticate" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "create_planar_buffer" , since : 1 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } , super :: MessageDesc { name : "create_prime_buffer" , since : 2 , signature : & [super :: ArgumentType :: NewId , super :: ArgumentType :: Fd , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Uint , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int , super :: ArgumentType :: Int ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Request :: Authenticate { .. } => 0 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 2 , Request :: CreatePrimeBuffer { .. } => 3 , } } fn since (& self) -> u32 { match * self { Request :: Authenticate { .. } => 1 , Request :: CreateBuffer { .. } => 1 , Request :: CreatePlanarBuffer { .. } => 1 , Request :: CreatePrimeBuffer { .. } => 2 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { 1 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 2 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , 3 => Some (Object :: from_interface :: < super :: wl_buffer :: WlBuffer > (version , meta . child () ,)) , _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { panic ! ("Request::from_raw can not be used Client-side.") } fn into_raw (self , sender_id : u32) -> Message { match self { Request :: Authenticate { id } => Message { sender_id : sender_id , opcode : 0 , args : smallvec ! [Argument :: Uint (id) ,] , } , Request :: CreateBuffer { name , width , height , stride , format } => Message { sender_id : sender_id , opcode : 1 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (stride) , Argument :: Uint (format) ,] , } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 2 , args : smallvec ! [Argument :: NewId (0) , Argument :: Uint (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => Message { sender_id : sender_id , opcode : 3 , args : smallvec ! [Argument :: NewId (0) , Argument :: Fd (name) , Argument :: Int (width) , Argument :: Int (height) , Argument :: Uint (format) , Argument :: Int (offset0) , Argument :: Int (stride0) , Argument :: Int (offset1) , Argument :: Int (stride1) , Argument :: Int (offset2) , Argument :: Int (stride2) ,] , } , } } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Request , () > { panic ! ("Request::from_raw_c can not be used Client-side.") } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { match self { Request :: Authenticate { id } => { let mut _args_array : [wl_argument ; 1] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . u = id ; f (0 , & mut _args_array) } , Request :: CreateBuffer { name , width , height , stride , format } => { let mut _args_array : [wl_argument ; 6] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = stride ; _args_array [5] . u = format ; f (1 , & mut _args_array) } , Request :: CreatePlanarBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . u = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (2 , & mut _args_array) } , Request :: CreatePrimeBuffer { name , width , height , format , offset0 , stride0 , offset1 , stride1 , offset2 , stride2 } => { let mut _args_array : [wl_argument ; 11] = unsafe { :: std :: mem :: zeroed () } ; _args_array [0] . o = :: std :: ptr :: null_mut () as * mut _ ; _args_array [1] . h = name ; _args_array [2] . i = width ; _args_array [3] . i = height ; _args_array [4] . u = format ; _args_array [5] . i = offset0 ; _args_array [6] . i = stride0 ; _args_array [7] . i = offset1 ; _args_array [8] . i = stride1 ; _args_array [9] . i = offset2 ; _args_array [10] . i = stride2 ; f (3 , & mut _args_array) } , } } } # [derive (Debug)] # [non_exhaustive] pub enum Event { # [doc = ""] Device { name : String , } , # [doc = ""] Format { format : u32 , } , # [doc = ""] Authenticated , # [doc = ""] Capabilities { value : u32 , } , } impl super :: MessageGroup for Event { const MESSAGES : & 'static [super :: MessageDesc] = & [super :: MessageDesc { name : "device" , since : 1 , signature : & [super :: ArgumentType :: Str ,] , destructor : false , } , super :: MessageDesc { name : "format" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } , super :: MessageDesc { name : "authenticated" , since : 1 , signature : & [] , destructor : false , } , super :: MessageDesc { name : "capabilities" , since : 1 , signature : & [super :: ArgumentType :: Uint ,] , destructor : false , } ,] ; type Map = super :: ProxyMap ; fn is_destructor (& self) -> bool { match * self { _ => false , } } fn opcode (& self) -> u16 { match * self { Event :: Device { .. } => 0 , Event :: Format { .. } => 1 , Event :: Authenticated => 2 , Event :: Capabilities { .. } => 3 , } } fn since (& self) -> u32 { match * self { Event :: Device { .. } => 1 , Event :: Format { .. } => 1 , Event :: Authenticated => 1 , Event :: Capabilities { .. } => 1 , } } fn child < Meta : ObjectMetadata > (opcode : u16 , version : u32 , meta : & Meta) -> Option < Object < Meta >> { match opcode { _ => None , } } fn from_raw (msg : Message , map : & mut Self :: Map) -> Result < Self , () > { match msg . opcode { 0 => { let mut args = msg . args . into_iter () ; Ok (Event :: Device { name : { if let Some (Argument :: Str (val)) = args . next () { let s = String :: from_utf8 (val . into_bytes ()) . unwrap_or_else (| e | String :: from_utf8_lossy (& e . into_bytes ()) . into ()) ; s } else { return Err (()) ; } } , }) } , 1 => { let mut args = msg . args . into_iter () ; Ok (Event :: Format { format : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , 2 => Ok (Event :: Authenticated) , 3 => { let mut args = msg . args . into_iter () ; Ok (Event :: Capabilities { value : { if let Some (Argument :: Uint (val)) = args . next () { val } else { return Err (()) ; } } , }) } , _ => Err (()) , } } fn into_raw (self , sender_id : u32) -> Message { panic ! ("Event::into_raw can not be used Client-side.") } unsafe fn from_raw_c (obj : * mut :: std :: os :: raw :: c_void , opcode : u32 , args : * const wl_argument ,) -> Result < Event , () > { match opcode { 0 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Device { name : :: std :: ffi :: CStr :: from_ptr (_args [0] . s) . to_string_lossy () . into_owned () , }) } , 1 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Format { format : _args [0] . u , }) } , 2 => { Ok (Event :: Authenticated) } , 3 => { let _args = :: std :: slice :: from_raw_parts (args , 1) ; Ok (Event :: Capabilities { value : _args [0] . u , }) } , _ => return Err (()) , } } fn as_raw_c_in < F , T > (self , f : F) -> T where F : FnOnce (u32 , & mut [wl_argument]) -> T { panic ! ("Event::as_raw_c_in can not be used Client-side.") } } # [derive (Clone , Eq , PartialEq)] pub struct WlDrm (Proxy < WlDrm >) ; impl AsRef < Proxy < WlDrm >> for WlDrm { # [inline] fn as_ref (& self) -> & Proxy < Self > { & self . 0 } } impl From < Proxy < WlDrm >> for WlDrm { # [inline] fn from (value : Proxy < Self >) -> Self { WlDrm (value) } } impl From < WlDrm > for Proxy < WlDrm > { # [inline] fn from (value : WlDrm) -> Self { value . 0 } } impl std :: fmt :: Debug for WlDrm { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { f . write_fmt (format_args ! ("{:?}" , self . 0)) } } impl Interface for WlDrm { type Request = Request ; type Event = Event ; const NAME : & 'static str = "wl_drm" ; const VERSION : u32 = 2 ; fn c_interface () -> * const wl_interface { unsafe { & wl_drm_interface } } } impl WlDrm { # [doc = ""] pub fn authenticate (& self , id : u32) -> () { let msg = Request :: Authenticate { id : id } ; self . 0 . send :: < AnonymousObject > (msg , None) ; } # [doc = ""] pub fn create_buffer (& self , name : u32 , width : i32 , height : i32 , stride : u32 , format : u32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreateBuffer { name : name , width : width , height : height , stride : stride , format : format } ; self . 0 . send (msg , None) . unwrap () } # [doc = ""] pub fn create_planar_buffer (& self , name : u32 , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePlanarBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } # [doc = "Only available since version 2 of the interface."] pub fn create_prime_buffer (& self , name : :: std :: os :: unix :: io :: RawFd , width : i32 , height : i32 , format : u32 , offset0 : i32 , stride0 : i32 , offset1 : i32 , stride1 : i32 , offset2 : i32 , stride2 : i32) -> Main < super :: wl_buffer :: WlBuffer > { let msg = Request :: CreatePrimeBuffer { name : name , width : width , height : height , format : format , offset0 : offset0 , stride0 : stride0 , offset1 : offset1 , stride1 : stride1 , offset2 : offset2 , stride2 : stride2 } ; self . 0 . send (msg , None) . unwrap () } } # [doc = r" The minimal object version supporting this request"] pub const REQ_AUTHENTICATE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PLANAR_BUFFER_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this request"] pub const REQ_CREATE_PRIME_BUFFER_SINCE : u32 = 2u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_DEVICE_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_FORMAT_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_AUTHENTICATED_SINCE : u32 = 1u32 ; # [doc = r" The minimal object version supporting this event"] pub const EVT_CAPABILITIES_SINCE : u32 = 1u32 ; static mut wl_drm_requests_create_buffer_types : [* const wl_interface ; 6] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_planar_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; static mut wl_drm_requests_create_prime_buffer_types : [* const wl_interface ; 11] = [unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_requests : [wl_message ; 4] = [wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuu\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_buffer_types as * const _ } , } , wl_message { name : b"create_planar_buffer\0" as * const u8 as * const c_char , signature : b"nuiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_planar_buffer_types as * const _ } , } , wl_message { name : b"create_prime_buffer\0" as * const u8 as * const c_char , signature : b"2nhiiuiiiiii\0" as * const u8 as * const c_char , types : unsafe { & wl_drm_requests_create_prime_buffer_types as * const _ } , } ,] ; # [doc = r" C-representation of the messages of this interface, for interop"] pub static mut wl_drm_events : [wl_message ; 4] = [wl_message { name : b"device\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"authenticated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } ,] ; # [doc = r" C representation of this interface, for interop"] pub static mut wl_drm_interface : wl_interface = wl_interface { name : b"wl_drm\0" as * const u8 as * const c_char , version : 2 , request_count : 4 , requests : unsafe { & wl_drm_requests as * const _ } , event_count : 4 , events : unsafe { &raw const wl_drm_events as * const _ } , } ; }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               +++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0133`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `nvscreencopy` (bin "nvscreencopy") due to 14 previous errors; 150 warnings emitted
[INFO] running `Command { std: "docker" "inspect" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114", kill_on_drop: false }`
[INFO] [stdout] 4ad50f041f6a304bae859135ea5e4d8db8034cec2da19a52e0333c72e1c08114
